
w = list(range(10))
print(w)

"""

a =[3,4,9,'a',12,31,45,"zm"]
for i in a:
    if type(i) == str:
        a.remove(i)
print(a)
for i in range(len(a)):
    if type(a[i]) == str:
        del a[i]
print(a)
b = [8,9,10,34,"1","4","zimsb"]
for m in b:
    if type(m) == str:
        b.remove(m)
print(b)
for m in range(len(b)):
    if type(b[m]) == str:
        del b[m]
        print(b)
"""
"""
result = []
for i in b:
    if type(i) == str:
        continue
    else:
        result.append(i)
print(result)
"""
#2
"""
a=[1,2,3,4,5,2,3]



result = []
for i in a:
    if i not in result:
        result.append(i)
print(result)

c=[]
for w in a:
    if w not in c:
        c.append(w)
        print(c)
"""
#3
l1 = [1, 2, 3, 4, 5]
#（1）在l1的元素3后面插入300
"""
l1.insert(3,300)
print(l1)
l1.remove(2)
print(l1)
"""
# print(l1.index(5))
"""
l1[l1.index(5)] = 500
print(l1)
"""
"""
print(l1[1:4])
print(l1[-5:-2])
print(l1[-3:])
"""
#4
"""
names=["王长帅","刘子铭","朱建波"]
name=input("请输入姓名")
if name in names:
    print("您输入的姓名已存在！")
else:
    names.append(name)
    print("成功输入姓名%s"% name) 
"""
#5
#5.1
"""
l = [1,2,3,[4,5]]

l[3][0]=400
print(l)
"""
#5.2
"""
l[3].append(6)
print(l)
"""
"""
l[3].insert(2,6)
print(l)
"""
#6
"""
e=[1,3,5,7,9]
s=sum(e)
y=len(e)
print(s/y)
"""
#7
"""
q = [1,4,6,8,9]
r=[]
for i in q:
    if i%2 == 0:
        r.append(i)

"""
#8
"""
print(r)
g=[13,14,17,18,19]
print(max(g))
print(g.index(max(g)))
"""
#9
"""
names=["王长帅","刘子铭","朱建波"]
# name=input("请输入姓名")
# if name in names:
#     print("您输入的姓名已存在！")
# else:
#     names.append(name)
#     print("成功输入姓名%s"% name)
dename = input("请输入姓名")
if dename in names:
    names.remove(dename)
    print("成功删除姓名%s"% dename)
print(names)
name1 = input("请输入要修改的姓名")
names.append(name1)
print(names)
quit
"""
#10  不对
"""
# 10、计算传入的string中,数字,字母,空格以及其它内容的个数,并返回结果
str1 = "123 asd !@#$%"
int_num = 0 # 整数的计数器
str_num = 0 # 字母计数器
other_num = 0 # 其他符号的计数器
space = 0 # 空格计数器
for i in str1:
    if i in "0123456789":
        int_num +=1 # 如果在里的话  int_num = int_num+1
    elif i in " ":
        space +=1 # 空格+1
    elif (i >="a" and i <= "z") or (i >="A" and i <= "Z"):
        str_num+=1
    else:
        other_num +=1 # 空格+1
print(f"整数有{int_num}个，字母有{str_num}个，空格有{space}个，其他内容有{other_num}个")
# 假如说这是一个列表，列表里面有空格、字符串、数字然后么计算机列表里的个数好使吗？
str1 = ["123 asd !@#$%","123","asd","!@#$$%%",456]
int_list = 0
str_list = 0
for i in str1:
    if type(i) == str:
        str_list+=1
    elif type(i) == int:
        int_list+=1
print(f"整数有{int_list}，字符串有{str_list}个")

"""
#11
"""
print(sum(range(1,101)))
"""
#12
"""
t=["刘子铭","郭子铭","麻子铭","刘子铭",6,6]
s=[]
for i in t:
    if i not in s:
        s.append(i)
print(s)
"""


#这个不对
"""
l1 = [1,1,2,2,3,3,3,6,6,5,5,2,2]
for a in l1:
    if l1.count(a) > 1:
        l1.remove(a)
print(l1)
"""
#13
"""
import random
a =[0,1,2,3,4,5,6,7,8,9]
r =[[],[],[],[]]
for i in a:
    m = random.choice(r)
    m.append(i)
print(r)
import random
a = [0,1,2,3,4,5,6,7,8,9]
b =[[],[],[],[]]
for i in a:
     m = random.choice(b)
     m.append(i)
     print(b)
"""
#14
"""
a=input("输入一个数字")
n=int(a)
if n > 1500:
    print("数字大于1500！")
if n == 1500:
    print("输入数字等于1500！")
if n < 1500:
    print("输入数字小于1500！")
"""


















